﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BulldogCMS.Manager.Models;

namespace BulldogCMS.Manager
{
    public class ManagerContext
    {
        public static ManagerContext Current
        {
            get
            {
                if (HttpContext.Current.Session["managerContext"] != null)
                {
                    return HttpContext.Current.Session["managerContext"] as ManagerContext;
                }
                return null;
            }
        }

        public static void SetContext(ManagerContext context) {
            HttpContext.Current.Session["managerContext"] = context;
        }

        public User User
        {
            get;
            set;
        }
    }
}